package cn.xzhang.boot.model.entity;

import cn.xzhang.boot.common.pojo.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;


import java.io.Serializable;

/**
* 轮播图
* @TableName Carousel
* @author <a href="https://github.com/XiaoZhangCode">XiaoZhangCode</a>
*/
@TableName(value ="carousel")
@Data
@EqualsAndHashCode(callSuper = true)
public class Carousel extends BaseDO implements Serializable {


    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private Long id;

    @Schema(description = "跳转链接地址")
    private String url;

    @Schema(description = "排序字段",requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer sort;

    @Schema(description = "缩略图地址",requiredMode = Schema.RequiredMode.REQUIRED)
    private String picUrl;

    @Schema(description = "跳转方式，默认：self，外站：miniProgram",requiredMode = Schema.RequiredMode.REQUIRED)
    private String target;

    @Schema(description = "外部小程序的app-id",requiredMode = Schema.RequiredMode.REQUIRED)
    private String appId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}